package db.newversion;


public class Combination2 extends Combination {
	private String tournamentType;

	public Combination2(String tournamentType, String bowCathegory, String ageClass, String gender) {
		super(bowCathegory, ageClass, gender);
		this.tournamentType = tournamentType;

	}

	public String getTournamentType() {
		return this.tournamentType;
	}

	public void setTournamentType(String tournamentType) {
		this.tournamentType = tournamentType;
	}

	@Override
	public String toString() {
		return this.tournamentType + " " + super.toString();
	}

	@Override
	public boolean equals(Object obj) {
		if (obj instanceof Combination2) {
			if (((Combination2) obj).getBowCathegory().equals(this.getBowCathegory())) {
				if (((Combination2) obj).getAgeClass().equals(this.getAgeClass())) {
					if (((Combination2) obj).getGender().equals(this.getGender())) {
						if (((Combination2) obj).getTournamentType().equals(this.getTournamentType())) {
							return true;
						}
					}
				}
			}
		}
		return false;
	}

	@Override
	public int hashCode() {
		return super.hashCode() + this.getTournamentType().hashCode();
	}

	@Override
	public int compareTo(Object arg0) {
		return this.toString().compareTo(arg0.toString());
	}
}
